package com.springcloud.learn.refactor;

import com.springcloud.learn.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/11/7.
 */
@RestController
public class RefactorFeignHelloController {

    @Autowired
    private RefactorHelloService refactorHelloService;



    @RequestMapping(value = "/feign-refactor-consumer3", method = RequestMethod.GET)
    public String helloConsumer2() {
        StringBuilder sb = new StringBuilder();
        sb.append(refactorHelloService.hello4("lvcr")).append("\n");
        sb.append(refactorHelloService.hello5("lvcr", 26)).append("\n");
        sb.append(refactorHelloService.hello6(new User("lvcr", 25))).append("\n");
        return sb.toString();
    }


}
